
package com.red.wine.util;



/**
 * 
 */
public interface ICache<T> {

	/*
	 * get object by exists key
	 */
	public Object get(T key);

	/*
	 * get object, return a default value when doesn't exists
	 */
	public Object get(T key, Object defaultValue);

	/*
	 * put a object to cache
	 */
	public void put(T key, Object value);

	
	/*
	 * remove an exists object from cache
	 */
	public void remove(T key);

	/*
	 * check if exists
	 */
	public boolean exists(T key);
}
